Nicknames: Northern Sky Raid Tools compatibility (precedence popup)#152
Open
Maelareth wants to merge 2 commits into
Open
Nicknames: Northern Sky Raid Tools compatibility (precedence popup)#152Maelareth wants to merge 2 commits into
Maelareth wants to merge 2 commits into
Conversation
added 2 commits
June 11, 2026 07:22
Detect when Northern Sky Raid Tools is also set to manage names on DandersFrames frames (it overwrites DF:GetUnitName), and prompt the user once which should win. The choice (framePrecedence) is honoured by a new DF:GetFrameName that resolves our own nicknames first, so DandersFrames stays authoritative even though NSRT re-overwrites the hook. Entirely DF-side: only reads NSRT's toggle, never modifies it. Popup strings hard-coded for the prototype; localise before merge.
- Localise all popup strings (L[...] + enUS registration); addon names are passed as format args so translators never touch them - Add a Name precedence dropdown to the Nicknames options page (only shown when NSRT is installed), making good on the popup's 'change it later' promise - Only prompt when the user actually has DF nicknames to show (entries, received, or a broadcast nick) - without this every NSRT user would get the popup with nothing to choose between - CHANGELOG entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Northern Sky Raid Tools can also be set to put nicknames on DandersFrames frames. When its Global Nicknames + DandersFrames toggles are on, it hard-overwrites
DF:GetUnitNamewith its own resolver — so with both addons managing names, the displayed name silently depends on load order and whichever addon refreshed last. Users get no signal that the two are fighting.(Discussed beforehand — this implements the approach you signed off on.)
Solution — entirely DF-side
NSRT is never modified or written to; we only read its settings.
DF:GetFrameName(unit)(Frames/Core.lua) — new display entry point used by our four render call sites (Bars, Update ×2, Text Designer DataSource).DF:GetUnitNamestays untouched as the public hook point for external addons.NK:GetDisplayName(unit)— honours a storedframePrecedencechoice: DF's own nicknames resolve first by default; if the user chose NSRT, we yield by callingNSAPI:GetName(name, "DandersFrames")directly (their own internal call — honours their per-addon toggle and Secret Values guards).PLAYER_REGEN_ENABLED), Esc re-asks next login. Only shown to users who actually HAVE DF nicknames (entries, received, or a broadcast nick), so plain NSRT users are never nagged.L[...]+ enUS registration; addon names passed as format args).Notes
GetUnitNameand runs its frame updates in the background — harmless (our render path resolves first), just a few wasted cycles on their side.Testing
/dumpprobes onGetFrameName/GetDisplayName.